package movie;

import java.util.Scanner;

/**
 * 2024/5/12
 */
public class MovieTest {
    public static void main(String[] args) {
        Movie[] movies = new Movie[4];
        movies[0]=new Movie(1,"水门桥",38.9,9.8,"小米","贾玲","20万票房");
        movies[1]=new Movie(2,"水门桥1",48.9,8.8,"小米1","贾玲1","21万票房");
        movies[2]=new Movie(3,"水门桥2",58.9,7.8,"小米2","贾玲2","21万票房");
        MovieOperator operator = new MovieOperator(movies);
       /* operator.printAllMovies();*/
        operator.MovieById(3);

        System.out.println("==电影信息系统==");
        System.out.println("1.查询全部电影信息");
        System.out.println("2.根据id查询某个电影的详细信息展示");
        System.out.println("请输入您的操作命令");
        Scanner sc = new Scanner(System.in);
        int nextInt = sc.nextInt();
        switch (nextInt){
            case 1:
                operator.printAllMovies();
                break;
            case 2:
                System.out.println("请输入电影id");
               int id= sc.nextInt();
               operator.MovieById(id);
               break;
            default:
                System.out.println("您输入的命令有问题");
        }
    }
}